﻿@using KRM.Core
@using KRM.Core.Library
@using KRM.Web.App_Start
@model KRM.Core.LoginModel
@{
    Layout = null;
    
}

<html lang="en" class="no-js">
<!-- BEGIN HEAD -->
<head>
    <meta charset="utf-8">
    <title>Kybotech | Login</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
    <meta content="width=device-width, initial-scale=1.0" name="viewport">
    <meta content="" name="description">
    <meta content="" name="author">
    <meta name="MobileOptimized" content="320">
    <!-- BEGIN GLOBAL MANDATORY STYLES -->
    <link href="/hr/js/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="/hr/js/plugins/bootstrap/css/bootstrap.css" rel="stylesheet" />
    <link href="/hr/js/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css">
    <!-- END GLOBAL MANDATORY STYLES -->
    <!-- BEGIN PAGE LEVEL STYLES -->
    <link rel="stylesheet" type="text/css" href="/hr/js/plugins/select2/select2_metro.css">
    <!-- END PAGE LEVEL SCRIPTS -->
    <!-- BEGIN THEME STYLES -->
    <link href="/hr/css/style-metronic.css" rel="stylesheet" type="text/css">
    <link href="/hr/css/style.css" rel="stylesheet" type="text/css">
    <link href="/hr/css/style-responsive.css" rel="stylesheet" type="text/css">
    <link href="/hr/css/plugins.css" rel="stylesheet" type="text/css">
    <link href="/hr/css/themes/default.css" rel="stylesheet" type="text/css" id="style_color">
    <link href="/hr/css/pages/login.css" rel="stylesheet" type="text/css">
    <link href="/hr/css/custom.css" rel="stylesheet" type="text/css">
    <!-- END THEME STYLES -->
    <link rel="shortcut icon" href="/img/favicon.ico">

    <!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
    <!-- BEGIN CORE PLUGINS -->
    <!--[if lt IE 9]>
            <script src="/hr/js/plugins/respond.min.js"></script>
            <script src="/hr/js/plugins/excanvas.min.js"></script> 
        <![endif]-->
    <script src="/hr/js/plugins/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script src="~/js/jquery.signalR-1.0.0-rc2.js"></script>
    <script src="/signalr/hubs" type="text/javascript"></script>
    <script src="~/js/espresso.js"></script>
    <script src="/hr/js/plugins/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
    <script src="/hr/js/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
    <script src="/hr/js/plugins/bootstrap-hover-dropdown/twitter-bootstrap-hover-dropdown.min.js" type="text/javascript"></script>
    <script src="/hr/js/plugins/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
    <script src="/hr/js/plugins/jquery.blockui.min.js" type="text/javascript"></script>
    <script src="/hr/js/plugins/jquery.cookie.min.js" type="text/javascript"></script>
    <script src="/hr/js/plugins/uniform/jquery.uniform.min.js" type="text/javascript"></script>
    <!-- END CORE PLUGINS -->
    <!-- BEGIN PAGE LEVEL PLUGINS -->
    <script src="/hr/js/plugins/jquery-validation/dist/jquery.validate.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="/hr/js/plugins/select2/select2.min.js"></script>
    <!-- END PAGE LEVEL PLUGINS -->
    <!-- BEGIN PAGE LEVEL SCRIPTS -->
    <script src="/hr/js/app.js" type="text/javascript"></script>
    <script src="/hr/js/login.js" type="text/javascript"></script>
    <!-- END PAGE LEVEL SCRIPTS -->
    <script>
        jQuery(document).ready(function () {
            App.init();
            Login.init();
        });
    </script>
    <!-- END JAVASCRIPTS -->
</head>
<!-- BEGIN BODY -->
<body class="login" style="">
    @if (tblCompanyVariable.ListIpAccessKRMWeb.Contains(Request.UserHostAddress))
    {
        <!-- BEGIN LOGO -->
        <div class="logo">
            <img width="360" src="/hr/img/logokybotech.png" alt="">
        </div>
        <!-- END LOGO -->
        <!-- BEGIN LOGIN -->
        <div class="content">
            <!-- BEGIN LOGIN FORM -->
            @if (User.Identity.IsAuthenticated)
            {
                Response.Redirect("/");
            }

            <form class="login-form" action="/users/login" method="post" novalidate="novalidate" autocomplete="off">
                <input type="hidden" name="returnurl" value="@ViewBag.ReturnUrl" />
                @Html.AntiForgeryToken()
                <h3 class="form-title">Login to your account</h3>
                @Html.Partial("Partial/_MessageResult")
                <div id="msg-login">
                    @Html.ValidationSummary(true)
                </div>
                <div class="form-group">
                    <!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
                    <label class="control-label visible-ie8 visible-ie9">Username</label>
                    <div class="input-icon">
                        <i class="icon-user"></i>
                        <input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="Username" id="username" name="username" value="@(Model == null ? "" : Model.UserName)">
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label visible-ie8 visible-ie9">Password</label>
                    <div class="input-icon">
                        <i class="icon-lock"></i>
                        <input class="form-control placeholder-no-fix" type="password" autocomplete="off" placeholder="Password" name="password">
                    </div>
                </div>
                <div class="form-group">
                    @Html.Raw(Html.GenerateCaptcha())
                </div>
                @*<div class="form-group">
                <label class="control-label visible-ie8 visible-ie9">PIN Number</label>
                <div class="input-icon">
                    <i class="icon-th-large"></i>
                    <input class="form-control placeholder-no-fix" type="password" maxlength="6" autocomplete="off" placeholder="PIN Number" name="pinnumber">
                </div>
            </div>*@

                @*<div class="form-group">
                    <!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
                    <label class="control-label visible-ie8 visible-ie9">Token</label>
                    <div class="input-group">
                        <div class="input-icon">
                        <i class="icon-lock"></i>
                                 <input type="text" class="form-control placeholder-no-fix" autocomplete="off" placeholder="Token" name="token">
                            </div>
                                 <span class="input-group-btn" style="vertical-align:text-top">                                 
                                 <a onclick="RequestToken()" href="#" class="btn blue">Request <i class="icon-envelope-alt"></i></a>
                                 </span>
                              </div>
                </div>*@

                <div class="form-group">
                    <div id="divLoading" class="ajax-loading" style="display: none;">
                    </div>
                    <div id="divMessage" class="alert alert-info" style="display: none;">
                        <button type="button" class="close" data-dismiss="alert" aria-hidden="true"></button>
                        <label id="RequestTokenMess">Error !!!</label>
                    </div>
                </div>
                @*<div class="form-actions">
                    <label class=" control-label" >
                        <div>
                           <span class="checked">
                                <input type="checkbox" name="rememberme" value="true">
                               Remember me
                           </span>
                        </div>
                        </label> 
                </div>*@
                <div class="form-actions">
                    <button type="submit" class="btn green pull-right">
                        Login <i class="m-icon-swapright m-icon-white"></i>
                    </button>
                </div>

                @*<div class="forget-password">
                    <h4>Forgot your password ?</h4>
                    <p>
                        no worries, click <a href="javascript:;" id="forget-password">here</a>
                        to reset your password.
                    </p>
                </div>*@

            </form>
            <!-- END LOGIN FORM -->
            <!-- BEGIN FORGOT PASSWORD FORM -->
            <form class="forget-form" action="/users/ForgetPassword" method="post" novalidate="novalidate">
                <h3>Forget Password ?</h3>
                <p>Enter your e-mail address below to reset your password.</p>
                <div class="form-group">
                    <div class="input-icon">
                        <i class="icon-envelope"></i>
                        <input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="Email" name="email">
                    </div>
                </div>

                <div class="form-actions">
                    <button type="button" id="back-btn" class="btn">
                        <i class="m-icon-swapleft"></i>Back
                    </button>
                    <button type="submit" class="btn green pull-right">
                        Submit <i class="m-icon-swapright m-icon-white"></i>
                    </button>
                </div>
            </form>
            <!-- END FORGOT PASSWORD FORM -->

        </div>
        <!-- END LOGIN -->
        <!-- BEGIN COPYRIGHT -->
        <div class="copyright">
            2013 © VCN Corporation.
        </div>
        <!-- END COPYRIGHT -->
        <!-- END BODY -->
    }
    else
    {
        Response.Redirect("/users/invalidipaddress");
    }
</body>
</html>
